﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EasyErp.Domain
{
    public class GumSheetRepository
    {
        erpEntities db = new erpEntities();

        public int GetEmployeeId(string employeeNo)
        {
            EmployeeInfo EmployeeInfo = db.EmployeeInfo.SingleOrDefault(x => x.EmployeeNo == employeeNo);

            int employeeId = 0;

            if(EmployeeInfo!=null)
                employeeId = EmployeeInfo.EmployeeId;

            return employeeId;
        }

        public int GetOperationId(int operationNo)
        {
            OperationInfo OperationInfo = db.OperationInfo.SingleOrDefault(x => x.OperationNo == operationNo);

            int operationId = 0;
            
            if(OperationInfo!=null)
                operationId = OperationInfo.OperationId;

            return operationId;
        }
    }
}
